package com.gidgabs.modules.entity;

import com.gidgabs.dto.TbOrderDto;

import java.io.Serializable;
import java.util.Date;



/**
 * 产品订单表
 * 
 * @author lanyonglin
 * @email www.baidu.com
 * @date 2018-07-02 10:07:40
 */
public class TbOrderEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	//
	private Integer id;
	//订单编码
	private String orderCode;
	//用户id
	private Integer userId;
	//联系人
	private String contact;
	//手机号
	private String phone;
	//订单状态 1待支付 2 待接收 3 待评价 4 已退款
	private Integer orderStatus;
	//详细地址
	private String orderAddress;
	//订单运费 单位 分
	private Integer orderSendPrice;
	//订单实付金额 单位 分
	private Integer orderPrice;
	//订单总金额 单位 分
	private Integer orderTotalPrice;
	//订单支付类型
	private Integer orderpayType;
	//创建时间
	private Date createTime;
	//订单显示状态 0 未删除 1已删除
	private Integer deleteType;
	//快递公司编号
	private String sendCompanycode;
	//快递公司名称
	private String sendCompanyname;
	//快递单号
	private String sendOrdercode;
	//买家留言
	private String buyerMassage;
	//父级id
	private Integer orderSuperId;
	//收货地址id
	private Integer addressId;
	//商铺id
	private Integer productMasterId;

	public Integer getProductMasterId() {
		return productMasterId;
	}

	public void setProductMasterId(Integer productMasterId) {
		this.productMasterId = productMasterId;
	}

	public Integer getOrderSuperId() {
		return orderSuperId;
	}

	public void setOrderSuperId(Integer orderSuperId) {
		this.orderSuperId = orderSuperId;
	}

	public Integer getAddressId() {
		return addressId;
	}

	public void setAddressId(Integer addressId) {
		this.addressId = addressId;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getOrderCode() {
		return orderCode;
	}

	public void setOrderCode(String orderCode) {
		this.orderCode = orderCode;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getContact() {
		return contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public Integer getOrderStatus() {
		return orderStatus;
	}

	public void setOrderStatus(Integer orderStatus) {
		this.orderStatus = orderStatus;
	}

	public String getOrderAddress() {
		return orderAddress;
	}

	public void setOrderAddress(String orderAddress) {
		this.orderAddress = orderAddress;
	}

	public Integer getOrderSendPrice() {
		return orderSendPrice;
	}

	public void setOrderSendPrice(Integer orderSendPrice) {
		this.orderSendPrice = orderSendPrice;
	}

	public Integer getOrderPrice() {
		return orderPrice;
	}

	public void setOrderPrice(Integer orderPrice) {
		this.orderPrice = orderPrice;
	}

	public Integer getOrderTotalPrice() {
		return orderTotalPrice;
	}

	public void setOrderTotalPrice(Integer orderTotalPrice) {
		this.orderTotalPrice = orderTotalPrice;
	}

	public Integer getOrderpayType() {
		return orderpayType;
	}

	public void setOrderpayType(Integer orderpayType) {
		this.orderpayType = orderpayType;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Integer getDeleteType() {
		return deleteType;
	}

	public void setDeleteType(Integer deleteType) {
		this.deleteType = deleteType;
	}

	public String getSendCompanycode() {
		return sendCompanycode;
	}

	public void setSendCompanycode(String sendCompanycode) {
		this.sendCompanycode = sendCompanycode;
	}

	public String getSendCompanyname() {
		return sendCompanyname;
	}

	public void setSendCompanyname(String sendCompanyname) {
		this.sendCompanyname = sendCompanyname;
	}

	public String getSendOrdercode() {
		return sendOrdercode;
	}

	public void setSendOrdercode(String sendOrdercode) {
		this.sendOrdercode = sendOrdercode;
	}

	public String getBuyerMassage() {
		return buyerMassage;
	}

	public void setBuyerMassage(String buyerMassage) {
		this.buyerMassage = buyerMassage;
	}

	public TbOrderDto toDto(){
		TbOrderDto tbOrderDto = new TbOrderDto();
		tbOrderDto.setOrderSuperId(this.getOrderSuperId());
		tbOrderDto.setOrderSendPrice(this.getOrderSendPrice());
		tbOrderDto.setAddressId(this.getAddressId());
		tbOrderDto.setId(this.getId());
		tbOrderDto.setOrderCode(this.getOrderCode());
		tbOrderDto.setUserId(this.getUserId());
		tbOrderDto.setContact(this.getContact());
		tbOrderDto.setPhone(this.getPhone());
		tbOrderDto.setOrderStatus(this.getOrderStatus());
		tbOrderDto.setOrderAddress(this.getOrderAddress());
		tbOrderDto.setOrderPrice(this.getOrderPrice());
		tbOrderDto.setOrderpayType(this.getOrderpayType());
		tbOrderDto.setCreateTime(this.getCreateTime());
		tbOrderDto.setDeleteType(this.getDeleteType());
		tbOrderDto.setSendOrdercode(this.getSendOrdercode());
		tbOrderDto.setBuyerMassage(this.getBuyerMassage());
		tbOrderDto.setOrderTotalPrice(this.getOrderTotalPrice());
		tbOrderDto.setSendCompanycode(this.getSendCompanycode());
		tbOrderDto.setSendCompanyname(this.getSendCompanyname());
		tbOrderDto.setProductMasterId(this.getProductMasterId());
		return tbOrderDto;
	}
}
